package com.ychen.task;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimerTask;

/**
 * @author chenyuliao
 * @version 1.0
 * @description
 * @date 2020/10/20 20:58
 */
public class MyTimeTask extends TimerTask {
    private SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @Override
    public void run() {
        System.out.println("hello " + df.format(new Date()));
    }
}
